package com.example.shop.order.enums;

/**
 * 支付方式：微信支付、支付宝支付
 */
public enum PaymentMethod {
    /**
     * 微信支付
     */
    WX_PAY(1);
    private int paymentMethod;
    PaymentMethod(Integer paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public static PaymentMethod getPaymentMethod(Integer paymentMethod){
        PaymentMethod[] values = PaymentMethod.values();
        for(PaymentMethod value:values){
            if(value.paymentMethod == paymentMethod){
                return value;
            }
        }
        return null;
    }

    public int getPaymentMethod() {
        return paymentMethod;
    }


}
